public class MySAML2AttributeManager implements SAML2AttributeManager {
@Override
public Set<AttributeStatementType> getAttributes(AuthnRequestType authnRequestType, Principal userPrincipal) {
Set<AttributeStatementType> attributeStatementTypes = new HashSet<AttributeStatementType>();
AttributeStatementType attrStatement = new AttributeStatementType();
AttributeType attr = new AttributeType("Attribute1");
attr.setNameFormat(JBossSAMLURIConstants.NAMEID_FORMAT_UNSPECIFIED.get());
attr.addAttributeValue("AttributeValue1");
attrStatement.addAttribute(new AttributeStatementType.ASTChoiceType(attr));
attributeStatementTypes.add(attrStatement);
return attributeStatementTypes;
}
@Override
public Map<String, Object> getAttributes(Principal userPrincipal, List<String> attributeKeys) {
return null;
}
}